gdkwindow: Use toplevel for getting root cords in move_to_rect()
authorJonas Ådahl <jadahl@gmail.com>
Thu, 4 Aug 2016 05:56:15 +0000 (13:56 +0800)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 18 Aug 2016 08:51:57 +0000 (04:51 -0400)
commitf6929cfef81171f1b59a3950e88e2ce5599d3286
tree6d863fe01cc5cd9d01e68920afaf8efa6b5cfb61
parent4e0ebd0cdf5eefcb19f35aa85e1d84c0ef1f2a7d
gdkwindow: Use toplevel for getting root cords in move_to_rect()

The Wayland backend manages a set of fake root coordinate spaces, where
each non-relative positioned toplevel (i.e. not popups, popovers,
tooltips etc) make up the basis of separate fake root coordinate spaces.

This means that the Wayland backend doesn't have the abilitiy get a
proper root coordinate when querying on a non-toplevel GdkWindow. To
avoid this issue, first find the toplevel, while translating the anchor
rect coordinates so that they are in the toplevel window coordinate
space. Then use this toplevel to translate the coordinates to root
window coordinate space.

https://bugzilla.gnome.org/show_bug.cgi?id=769402
gdk/gdkwindowimpl.c